﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProductionManagement.Domain.Dtos.ProductionPlanDtos
{
    /// <summary>
    /// 反填修改生产计划DTO
    /// </summary>
    public class UpdProductionPlanDto
    {
        public int ProductionPlansId { get; set; } // 生产计划id
        public int? PreProductionPlanId { get; set; } // 预生产计划id
        public int? PreProductionState { get; set; } // 生成订单状态
        public string? PPDocumentNumber { get; set; } // 单据编号
        public int? SaleContractId { get; set; }//销售合同id
        public string? PPlanName { get; set; }// 计划名称
        public decimal? PPTotalQuantity { get; set; } // 数量合计
        public bool? Whetherautomatic { get; set; }//是否自动生成订单
        public string? PPlanSmark { get; set; } //备注
        /// <summary>
        /// 添加人姓名
        /// </summary>
        public string? AddName { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime? AddTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 修改人姓名
        /// </summary>
        public string? UpdName { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdTime { get; set; }
        /// <summary>
        /// 公司id
        /// </summary>
        public string? Office_Id { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        public int? User_Id { get; set; }
        public List<UpdProductionProductDto> UpdDto { get; set; }
    }

    public class UpdProductionProductDto
    {
        public int ProductionProductId { get; set; } // 生产计划产品id
        public string? PPDocumentNumber { get; set; } // 单据编号
        public int? ProductId { get; set; } // 产品id
        /// <summary>
        /// 产品编号
        /// </summary>
        public string? PNumber { get; set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        public string? PName { get; set; }
        /// <summary>
        /// 规格型号
        /// </summary>
        public string? PSpec { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        public string? PUnit { get; set; }
        public int? PPNum { get; set; } // 数量
        /// <summary>
        /// 物料清单主题
        /// </summary>
        public string? MSubject { get; set; }
        public DateTime? PPAppStartDate { get; set; } // 计划开工日期
        public DateTime? PPAppEndDate { get; set; } // 计划完工日期
        public DateTime? PPReleDate { get; set; } // 交货日期
        public string? PProuctSmark { get; set; } //备注 
    }
}
